<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateLogsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('logs', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->charset = 'utf8mb4';
            $table->collation = 'utf8mb4_unicode_ci';
            
            $table->increments('lid', 7)->autoIncrement();
            $table->string('aid', 5)->nullable($value = true);
            $table->string('atitle', 40)->nullable($value = true);
            $table->string('uid', 4);
            $table->string('uname', 40);
            $table->string('operate', 40);
            $table->string('date', 10)->nullable($value = true);
            $table->string('text', 255)->nullable($value = true);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('logs');
    }
}
